Timing synchronization using a protocol such as IEEE 1588 PTP and a well-designed slave clock recovery mechanism can provide time synchronization in the sub-microsecond level and lower. Time synchronization requires an accurate measurement of the communication path delay between the time server (master) and the client (slave) in order to compute the time offset between them.
The PTP message exchange process (i.e., the PTP Delay Request/Delay Response flow) between a master and a slave is illustrated in FIG. 1 and described below.
IEEE 1588 PTP allows for two different types of timestamping methods, either one-step or two-step. One-step clocks update time information within event messages (Sync and Delay_Req) on-the-fly, while two-step clocks convey the precise timestamps of packets in general messages (Follow_Up and Delay_Resp). A Sync message is transmitted by a master 1 to its slaves 3 and either contains the exact time of its transmission or is followed by a Follow_Up message containing this time. In a two-step ordinary or boundary clock, the Follow_Up message communicates the value of the departure timestamp for a particular Sync message.
FIG. 1 illustrates the basic pattern of synchronization message exchanges for the two-step clocks. The master 1 sends a Sync message to the slave 3 over the packet network 2 and notes the time T1 at which it was sent. The slave receives the Sync message and notes the time of reception T2. The master 1 conveys to the slave 3 the timestamp T1 by one of two ways: 1) Embedding the timestamp T1 in the Sync message. This requires some sort of hardware processing (i.e., hardware timestamping) for highest accuracy and precision. 2) Embedding the timestamp T1 a Follow_Up message which is the sent to the slave (as shown in FIG. 1). Next, the slave 3 sends a Delay_Req message to the master 1 and notes the time T3 at which it was sent. The master receives the Delay_Req message and notes the time of reception T4. The master 1 conveys to the slave 3 the timestamp T4 by embedding it in a Delay_Resp message.
At the end of this PTP message exchange, the slave 3 possesses all four timestamps {T1, T2, T3, T4}. These timestamps may be used to compute the offset of the slave's clock 5 with respect to the master clock 4 and the mean propagation time of messages between the two clocks. The computation of offset and propagation time assumes that the master-to-slave and slave-to-master propagation times are equal, i.e. that there is a symmetrical communication path. Clock frequencies change over time, so periodic message exchanges are required. Because these clock variations change slowly, the period between message exchanges is typically on the order of milliseconds to seconds.
In most existing approaches, the path delay estimation is based on the important assumption that the time delay from master to slave is equal to that from slave to master. However, in reality, the communication paths are not perfectly symmetric, mainly due to dissimilar forward and reverse physical link delays and queuing delays. Even in cases where the physical link delays are known and properly compensated for during clock synchronization, queuing delays, which are variable, can still exist when timing messages go through the packet network and are queued for forwarding. In particular, the processing and buffering of packets in network devices (switches, routers, etc.) introduce variations in the time latency of packets traversing the packet network. This mainly happens when timing transfer is done in an end-to-end manner without any form of timing assistance from the network to help mitigate the effects of the variable queuing delays.
Variable queueing delays and any asymmetry in the forward and reverse queuing delays directly lead to increased errors in the phase offset estimation between a master and slave.
U.S. Pat. No. 9,112,628B describes a technique which enables the forward queueing delays to be approximately tracked sample-by-sample within a window but with an unknown fixed offset for the duration of the window. Similarly, the reverse queueing delays can be approximately tracked sample-by-sample but with a different unknown offset. In U.S. Pat. No. 9,112,628B these forward and backward queue delay (and offset) approximations are used in an additional step after the Kalman filter estimation of phase offset to modify and improve the estimate.
U.S. Pat. No. 9,112,628B discusses how the error in the phase offset estimation error, which is caused by queueing delay asymmetry, can be used to produce a phase offset estimate which more accurately represents the true phase offset between master and slave. This delay asymmetry compensation process is applied after the Kalman filter estimation of the phase offset as illustrated by equation 4 and the subsequent discussion in that document. Equation 25 of that document also suggests that the measurement noise should be coloured by the difference between the change in the forward delay between consecutive samples and the change in the reverse delay between consecutive samples, i.e., by Δqf(n)−Δqr(n).
U.S. Pat. No. 9,184,861B uses the variance of the difference between the forward and reverse message packet delay variations (“PDVs”) as the measurement noise term for the Kalman filter realisation. This measurement noise term is used directly by the Kalman filter estimation algorithm. The approach in U.S. Pat. No. 9,184,861 B2 is to accept that there is noise introduced by the queueing delays and then try to represent this noise faithfully.
An object of the present invention is to provide an improved way of accounting for the delay asymmetry when estimating the phase offset of a slave clock.
A further object of the present invention is to provide a way of maintaining the accuracy of estimations during periods of high load on one of the forward and reverse channels in a timing network.